export default {
  data() {
    return {
      data: [],
      loading: false
    }
  },
  async created() {
    this.getData()
  },
  methods: {
    async getData(apiFunc) {
      this.loading = true
      const res = await apiFunc()
      this.data = res.content
      this.loading = false
    }
  }
}
